<!DOCTYPE html>
<html lang="zh-cmn-Hans">

<head>
    <meta charset="UTF-8">
    <title>患者管理界面</title>
    <link rel="stylesheet" href="../css/bootstrap.css">
    <link rel="stylesheet" href="../css/doctor.css">
    <script type="text/javascript" src="../js/jquery-3.3.1.js"></script>
    <script type="text/javascript" src="../js/bootstrap.min.js"></script>
    <script type="text/javascript" src="../js/bootstrap.js"></script>
</head>

<body>
    <nav class="navbar navbar-default navbar-fixed-top" role="navigation">
        <div class="container-fluid">
            <div class="navbar-header"> <a class="navbar-brand" href="#">MCMS</a> </div>
            <div>
                <ul class="nav navbar-nav">
                    <li class="active"><a href="../index.html">首页</a></li>
                    <li><a href="#">帮助</a></li>
                </ul>
            </div>
        </div>
    </nav>
    <div id="content">
        <div id="navigation-1">
            <ul class="nav nav-tabs">
                <li class="active"><a href="#">基本信息</a></li>
            </ul>
        </div>
        <div id="navigation">
            <ul class="nav nav-pills nav-stacked">
                <li class="active"><a href="patientinformation.html">个人资料</a></li>
                <li><a href="pcases.html">病例查看</a></li>
                <li><a href="interviewinformation.html">访问记录</a></li>
                <li><a href="pabout.html">关于</a></li>
            </ul>
        </div>
        <div class="division"> </div>
        <div id="personInformation">
            <h3 class="p-size text-info">姓名</h3>
            <div class="division1"></div>
            <h4 id="name" class="text-muted"></h4>
            <h3 class="p-size text-info">生日</h3>
            <div class="division1"></div>
            <h4 id="birth" class="text-muted"></h4>
            <h3 class="p-size text-info">手机号码</h3>
            <div class="division1"></div>
            <h4 id="phone" class="text-muted"></h4>
        </div>
    </div>

    <script src="../js/jquery-3.3.1.js"></script>

    <script>
        $(function () {
            initData();
        });

        //加载初始化数据
        function initData() {
            $.ajax({
                type: 'post',
                dataType: "json",
                url: "/ajax/get_patient_info",
                success: function (res) {

                    console.log(res);

                    $("#name").append(res.patient_name);
                    $("#birth").append(res.patient_birth_year+res.patient_birth_mouth+res.patient_birth_day);
                    $("#phone").append(res.patient_connection);


                },
                error: function () {
//            $("#test").html("发生错误:"+jqXHR.status);
                    alert("发生错误");
                }
            });
        }


    </script>

</body>

</html>
